home *** CD-ROM | disk | FTP | other *** search
/ Greenhouse Effect Detection Expriment / NASA Greenhouse Effect Detection Expriment 1992 - Disc 2.iso / software / dos / cdf22pc / src / include / cdfcmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-02-24  |  2.9 KB  |  98 lines

  1. /******************************************************************************
  2. *
  3. *  NSSDC/CDF                    Header file for CDFcompare.
  4. *
  5. *  Version 1.1, 25-Feb-92, ST Systems (STX)
  6. *
  7. *  Modification history:
  8. *
  9. *   V1.0  23-Sep-91, J Love    Original version (for CDF V2.1).
  10. *   V1.1  25-Feb-92, J Love    IBM PC port.
  11. *
  12. ******************************************************************************/
  13.  
  14. /******************************************************************************
  15. * Function Prototypes.
  16. ******************************************************************************/
  17.  
  18. #if defined(vms) | defined(__MSDOS__)
  19. Boolean EquivalentDataTypes (long, long);
  20. long DataTypeSize (long);
  21. Boolean CompareCDFs (char *, char *);
  22. Boolean CompareGeneral (void);
  23. Boolean CompareEntry (char *, long, long, char *);
  24. Boolean CompareAttributes (void);
  25. Boolean CompareAttributeEntries (long, long, char *);
  26. Boolean CompareVariables (void);
  27. Boolean CompareVariableValues (long, long, char *);
  28. Boolean AttrNumberMatches (void);
  29. Boolean VarNumberMatches (void);
  30. void CleanupComparison (void);
  31. void ROWtoCOL (void *, void *, long, long *, long);
  32. void COLtoROW (void *, void *, long, long *, long);
  33. Boolean SameVarys (long, long, long, long *, long *);
  34. Boolean StatusHandler (char *, CDFstatus);
  35. #endif
  36.  
  37. #if defined(unix)
  38. Boolean EquivalentDataTypes ();
  39. long DataTypeSize ();
  40. Boolean CompareCDFs ();
  41. Boolean CompareGeneral ();
  42. Boolean CompareEntry ();
  43. Boolean CompareAttributes ();
  44. Boolean CompareAttributeEntries ();
  45. Boolean CompareEntry ();
  46. Boolean CompareVariables ();
  47. Boolean CompareVariableValues ();
  48. Boolean AttrNumberMatches ();
  49. Boolean VarNumberMatches ();
  50. void CleanupComparison ();
  51. void ROWtoCOL ();
  52. void COLtoROW ();
  53. Boolean SameVarys ();
  54. Boolean StatusHandler ();
  55. #endif
  56.  
  57. /******************************************************************************
  58. * Increment to next set of indices, column majority.
  59. ******************************************************************************/
  60.  
  61. #define INCRindicesCOL(numDims,dimSizes,indices) { \
  62. int _z_; \
  63. for (_z_ = 0; _z_ < numDims; _z_++) { \
  64.    if (indices[_z_] == dimSizes[_z_] - 1) \
  65.      indices[_z_] = 0; \
  66.    else { \
  67.      indices[_z_]++; \
  68.      break; \
  69.    } \
  70. } \
  71. }
  72.  
  73. /******************************************************************************
  74. * Increment to next set of indices, row majority.
  75. ******************************************************************************/
  76.  
  77. #define INCRindicesROW(numDims,dimSizes,indices) { \
  78. int _z_; \
  79. for (_z_ = numDims - 1; _z_ >= 0; _z_--) { \
  80.    if (indices[_z_] == dimSizes[_z_] - 1) \
  81.      indices[_z_] = 0; \
  82.    else { \
  83.      indices[_z_]++; \
  84.      break; \
  85.    } \
  86. } \
  87. }
  88.  
  89. /******************************************************************************
  90. * Convert string to uppercase.
  91. ******************************************************************************/
  92.  
  93. #define Upcase(string) { \
  94. int _i_; \
  95. for (_i_ = 0; string[_i_] != NUL; _i_++) \
  96.    if (islower(string[_i_])) string[_i_] = toupper(string[_i_]); \
  97. }
  98.